
export default{
    onopen:function(event,ws){
        this.onopen = function (event, ws) {
                ws.send('hello 连上了哦')
            }
    },
    onmessage:function(event, ws){
        var data = event.data;
        console.info(data);
    },
    onclose:function(e, ws){

    },
    onerror:function(e,ws){

    },
    ping:function(ws){
        ws.send('ping')
    }
}